import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)
const routes = [
  {
    path: '/',
    name: 'LoginPage',
    component: () => import("../views/LoginPage.vue")
  },
  {
    path: '/inspection',
    component: () => import("../views/Inspection.vue"),
    redirect: '/inspectionFormA',
    children: [
      {
        path: '/inspectionFormA',
        name: 'InspectionFormA',
        component: () => import("../views/InspectionFormA.vue")
      },
      {
        path: '/inspectionFormB',
        name: 'InspectionFormB',
        component: () => import("../views/InspectionFormB.vue")
      },
      {
        path: '/floorPlanPage',
        name: 'FloorPlanPage',
        component: () => import("../views/FloorPlanPage.vue")
      }
    ]
  },
  {
    path: '/load',
    component: () => import("../views/Load.vue")
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
